<div class="form">


<?php $form = $this->beginWidget('GxActiveForm', array(
	'id' => 'delivery-move-detail-model-form',
	'enableAjaxValidation' => false,
));
?>

	<p class="note">
		<?php echo Yii::t('app', 'Fields with'); ?> <span class="required">*</span> <?php echo Yii::t('app', 'are required'); ?>.
	</p>

	<?php echo $form->errorSummary($model); ?>
		<?php if($model->id>0):?>
		<div class="row">
		<?php echo $form->labelEx($model,'code'); ?>
		<?php echo $form->textField($model, 'code', array('maxlength' => 100, 'readonly'=>'readonly')); ?>
		<?php echo $form->error($model,'code'); ?>
		</div><!-- row -->
		<?php endif;?>
		<div class="row">
		<?php echo $form->labelEx($model,'type'); ?>
		<?php echo $form->textField($model, 'type', array('maxlength' => 100, 'value'=>DeliveryMoveDetailModel::DETAIL_TYPE, 'readonly'=>'readonly')); ?>
		<?php echo $form->error($model,'type'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'office_id'); ?>
		<?php 
		$listData = CHtml::listData(OfficeModel::model()->published()->findAll(), 'id', 'name');
		echo $form->dropDownList($model, 'office_id', $listData, array('prompt'=>'--None--'));
		?>
		<?php echo $form->error($model,'office_id'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'order_ticket_id'); ?>
		<?php echo CHtml::textField('ticket', DeliveryOrderTicketModel::model()->findByPk($ticket)->code, array('readonly'=>'readonly'));?>
		<?php if($model->id>0):?>
		<?php echo $form->hiddenField($model, 'order_ticket_id', array('readonly'=>'readonly')); ?>
		<?php else:?>
		<?php echo $form->hiddenField($model, 'order_ticket_id', array('readonly'=>'readonly','value'=>$ticket)); ?>
		<?php endif;?>
		<?php echo $form->error($model,'order_ticket_id'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'weight'); ?>
		<?php echo $form->textField($model, 'weight', array('maxlength' => 100)); ?>
		<?php echo $form->error($model,'weight'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'note'); ?>
		<?php echo $form->textArea($model, 'note'); ?>
		<?php echo $form->error($model,'note'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'created_datetime'); ?>
		<?php 
			echo CHtml::textField('created',date('d/m/Y H:i:s'), array('readonly'=>'readonly', "style"=>'width: 150px'));
		?>
		<?php echo $form->error($model,'created_datetime'); ?>
		</div><!-- row -->
<?php
echo GxHtml::submitButton(Yii::t('app', 'Save'),array('class'=>'btn btn-success'));
$this->endWidget();
?>
</div><!-- form -->